Skip to content

Add read support for handles with pending payloads #24320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 24, 2025

Conversation

ChumpChief
Copy link
Contributor

@ChumpChief ChumpChief commented Apr 10, 2025

This is the read portion of placeholder handles for blobs (as prototyped in #24158). It specifically adds:

  1. DocumentSchema support for the new schema flag, such that these readable clients won't blow up once the future write-mode-capable clients turn the flag on
  2. ContainerRuntime/BlobManager support for waiting on blobs to appear if their handles are tagged with placeholder

Getting this up now for consideration but I'm still looking into an oddity in interactions between this read-only support and the full prototype version that I need to iron out - something weird happening when the full prototype tries to upgrade the document schema. Determined the oddities were an unrelated bug.

AB#36250

@Copilot Copilot AI review requested due to automatic review settings April 10, 2025 21:21
@ChumpChief ChumpChief requested a review from a team as a code owner April 10, 2025 21:21
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc public api change Changes to a public API base: main PRs targeted against main branch labels Apr 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

packages/runtime/container-runtime/src/blobManager/blobManager.ts:365

  • Consider adding a default value for the 'placeholder' parameter (e.g., 'placeholder: boolean = false') to simplify calling this function in contexts where a placeholder is not explicitly needed.
public async getBlob(blobId: string, placeholder: boolean): Promise<ArrayBufferLike> {

packages/runtime/runtime-utils/src/remoteFluidObjectHandle.ts:38

  • [nitpick] It would be helpful to add inline documentation for the 'placeholder' parameter to clarify its purpose and expected use across clients.
public readonly placeholder: boolean,

@ChumpChief ChumpChief requested a review from scottn12 April 22, 2025 18:32
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  163679 links
    1315 destination URLs
    1547 URLs ignored
       0 warnings
       0 errors


@ChumpChief ChumpChief changed the title Add read support for placeholder handles Add read support for handles with pending payloads Apr 24, 2025
@ChumpChief ChumpChief merged commit 933aee1 into microsoft:main Apr 24, 2025
43 checks passed
@ChumpChief ChumpChief deleted the ReadPlaceholders branch April 24, 2025 17:02
markfields pushed a commit to markfields/FluidFramework that referenced this pull request Apr 24, 2025
Adds:
1. DocumentSchema support for the new schema flag, such that these
readable clients won't blow up once the future write-mode-capable
clients turn the flag on
2. ContainerRuntime/BlobManager support for waiting on blobs to appear
if their handles are tagged with `payloadPending`

[AB#36250](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/36250)
@@ -1588,6 +1588,7 @@ describe("Runtime", () => {
enableRuntimeIdCompressor: undefined,
enableGroupedBatching: true, // Redundant, but makes the JSON.stringify yield the same result as the logs
explicitSchemaControl: false,
createBlobPayloadPending: false, // Redundant, but makes the JSON.stringify yield the same result as the logs
Copy link
Contributor

@jason-ha jason-ha Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the reasons I made #24427 was so that we can list options are true | undefined and then we don't have to pollute telemetry. All of the following line additions could be removed.

See #24399 that takes advantage.

jason-ha added a commit that referenced this pull request Apr 25, 2025
…undefined (#24466)

matching IDocumentSchemaCurrent.runtime
and eliminating telemetry noise

Follow-up for #24320 before released for use. Document schema is
unchanged; only change is runtime option requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants